var express = require('express');
var app = express();

app.use(express.static('public'));
app.post('/event/readCard/recent', function (req, res) {
    res.json(require('./data/recent.json'))
});
app.post('/event/readCard/latest', function (req, res) {
    res.json(require('./data/latest.json'))
});
app.get('/terminal/countSubrange', function (req, res) {
    res.json(require('./data/8644.json'))
});
// app.get('/terminal/countSubrange', function (req, res) {
//     res.json(require('./data/864420.json'))
// });

var server = app.listen(3000, function () {
    var host = server.address().address;
    var port = server.address().port;

    console.log('Example app listening at http://%s:%s', host, port);
});